<template>
    <div>
        <el-button type="primary" @click="handlerClick">弹框</el-button>
        中国<text style='color:red'>船舶</text>物资采购电商平台数据互联互通网络对接系统建设项目中标结果公告.pdf
        <!--addtionpart-->

        <div class="content-item">

            <span class="item-title-block">附件（点击下载）：</span>

            <span class="item-title-block"><a class="baobiao-link" href="javascript: void(0);"
                    onclick="ProProjectFile(`中国<text style='color:red'>船舶</text>物资采购电商平台数据互联互通网络...','21524910`)">中国<text
                        style='color:red'>船舶</text>物资采购电商平台数据互联互通网络...</a></span>

        </div>

        <div v-html="msg"></div>
    </div>
</template>

<script>
import { log, formValidation } from "@/common/decorator.js";
import ChfToolbar from "@/components/chf-toolbar/index.vue"
export default {
    components: {
        ChfToolbar
    },
    data () {
        window.ProProjectFile = (a, b) => {
            console.log(a, b);
            this.msg = a;
        }
        return {
            value: '',
            msg: ''
        };
    },
    methods: {
        handlerClick () {
            this.$dialog({
                options: {
                    // center: true,
                    // width: '430px'
                },
                btns: [
                    // {
                    //     submit: true, type: "primary", content: "确定", click: (options) => {
                    //         console.log(this.$refs.form);
                    //         this.$refs.form.submitForm().then(async params => {
                    //             let interfaceType = 'addTable'
                    //             if (row) {
                    //                 interfaceType = 'editTable'
                    //             }
                    //             const res = await this.$api[interfaceType](params);
                    //             res && this.$message({
                    //                 message: row ? '编辑成功！' : '添加成功！',
                    //                 type: 'success'
                    //             });
                    //             this.$refs.grid.getData();
                    //             options.dialogVisible = false
                    //         })
                    //     }
                    // },
                    // {
                    //     content: "取消", click: (options) => {
                    //         options.dialogVisible = false
                    //     }
                    // }
                ],
                render: (options) => {
                    console.log(options);
                    setTimeout(() => {
                        options.dialogVisible = false;
                    }, 2000)
                    // this.formConfig.formData = row || null;
                    return (
                        <div>12123231123</div>
                    )
                },
            })
            // this.$drawer({
            //     options: {
            //         dialogVisible: true,
            //         size: "100%",
            //         title: '嵌套表单',
            //         direction: "ltr",
            //         ['destroy-on-close']: true
            //     },
            //     render: (options) => {
            //         console.log(options);
            //         return <div>{options}</div>
            //     }
            // })
        }
    },
};
</script>

<style>
</style>